import axios from 'axios'
import config from '../config.js'
let $http=function(url,params,callback){
    axios.post(config.base+url,params).then(function(res){
        callback(null,res);
    }).catch(function(err){
        callback(err,null);
    });
}
let $get=function(url,params,callback){
    axios.get(config.base+url,params).then(function(res){
        callback(null,res);
    }).catch(function(err){
        callback(err,null);
    });
}
export default{
    $http,
    $get
} 